package cn.spiral.qz_job.entity;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

import cn.spiral.user.entity.User;

/**
 * QzJob entity. @author MyEclipse Persistence Tools
 */

public class QzJob implements java.io.Serializable {


	private String jobId;
	private String jobCreator;
	private String jobName;
	private String jobTable;
	private Timestamp jobStartTime;
	private Integer jobSendType;
	private String jobContent;
	private Integer jobState;


	public QzJob() {
	}

	public QzJob(String jobId, String jobCreator, String jobName, String jobTable, Timestamp jobStartTime, String jobContent,
			Integer jobState) {
		this.jobId = jobId;
		this.jobCreator = jobCreator;
		this.jobName = jobName;
		this.jobTable = jobTable;
		this.jobStartTime = jobStartTime;
		this.jobContent = jobContent;
		this.jobState = jobState;
	}
	
	//发送的方式
	public static Integer JOB_SEND_TYPE_EMAIL=0;//发送邮箱
	public static Integer JOB_SEND_TYPE_PHONE=1;//发送手机
	public static Map<Integer, String> JOB_SEND_TYPE_MAP;
	
	//工作目前的状态
	public static Integer JOB_STATE_OPEN=1;//等待执行中
	public static Integer JOB_STATE_CLOSE=0;//暂停执行
	public static Integer JOB_STATE_INVALI=4;//超时失效
	public static Integer JOB_STATE_SUCCESS=3;//执行成功
	public static Integer JOB_STATE_FAIL=2;//执行失败
	public static Map<Integer, String> JOB_STATE_MAP;
	
	static{
		
		JOB_SEND_TYPE_MAP=new HashMap<Integer, String>();
		JOB_SEND_TYPE_MAP.put(JOB_SEND_TYPE_EMAIL, "邮箱");
		JOB_SEND_TYPE_MAP.put(JOB_SEND_TYPE_PHONE, "手机");
		
		JOB_STATE_MAP=new HashMap<Integer, String>();
		JOB_STATE_MAP.put(JOB_STATE_CLOSE, "暂停执行");
		JOB_STATE_MAP.put(JOB_STATE_OPEN, "等待执行");
		JOB_STATE_MAP.put(JOB_STATE_INVALI, "超时失效");
		JOB_STATE_MAP.put(JOB_STATE_SUCCESS, "执行成功");
		JOB_STATE_MAP.put(JOB_STATE_FAIL, "执行失败");
	}
	
	public QzJob(String jobId, String jobCreator, String jobName, String jobTable, Timestamp jobStartTime, Integer jobSendType,
			String jobContent, Integer jobState) {
		this.jobId = jobId;
		this.jobCreator = jobCreator;
		this.jobName = jobName;
		this.jobTable = jobTable;
		this.jobStartTime = jobStartTime;
		this.jobSendType = jobSendType;
		this.jobContent = jobContent;
		this.jobState = jobState;
	}


	public String getJobId() {
		return this.jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}
	
	public String getJobCreator() {
		return jobCreator;
	}

	public void setJobCreator(String jobCreator) {
		this.jobCreator = jobCreator;
	}

	public String getJobName() {
		return this.jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public String getJobTable() {
		return this.jobTable;
	}

	public void setJobTable(String jobTable) {
		this.jobTable = jobTable;
	}

	public Timestamp getJobStartTime() {
		return this.jobStartTime;
	}

	public void setJobStartTime(Timestamp jobStartTime) {
		this.jobStartTime = jobStartTime;
	}

	public Integer getJobSendType() {
		return this.jobSendType;
	}

	public void setJobSendType(Integer jobSendType) {
		this.jobSendType = jobSendType;
	}

	public String getJobContent() {
		return this.jobContent;
	}

	public void setJobContent(String jobContent) {
		this.jobContent = jobContent;
	}

	public Integer getJobState() {
		return this.jobState;
	}

	public void setJobState(Integer jobState) {
		this.jobState = jobState;
	}

}